﻿using Abp.Application.Services.Dto;
using Abp.AutoMapper;
using Akso.DataMaintains.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Akso.Web.Areas.FinanceModule.Models.DataMaintains
{
    public class DataMaintainsViewModel
    {
        public string FilterText { get; set; }
    }
    /// <summary>
    /// 在弹出的新增、修改账户窗口里面，传递给页面的ViewModel对象。
    /// </summary>
    [AutoMapFrom(typeof(GetBillAccountForEditOutput))]
    public class CreateOrEditBillAccountModalViewModel: GetBillAccountForEditOutput
    {
        public bool IsEditMode
        {
            get { return BillAccount.Id.HasValue; }
        }
        /// <summary>
        /// 学校列表
        /// </summary>
        public List<ComboboxItemDto> GetSchoolList { get; set; }
        public CreateOrEditBillAccountModalViewModel(GetBillAccountForEditOutput output)
        {
            output.MapTo(this);
        }
    }
    /// <summary>
    /// 在弹出的新增、修改收支分类窗口里面，传递给页面的ViewModel对象。
    /// </summary>
    [AutoMapFrom(typeof(GetIncomeExpendTypeForEditOutput))]
    public class CreateOrEditIncomeExpendTypeModalViewModel : GetIncomeExpendTypeForEditOutput
    {
        public bool IsEditMode
        {
            get { return IncomeExpendType.Id.HasValue; }
        }
        
        public CreateOrEditIncomeExpendTypeModalViewModel(GetIncomeExpendTypeForEditOutput output)
        {
            output.MapTo(this);
        }
    }

    /// <summary>
    /// 在弹出的新增、修改辅助核算窗口里面，传递给页面的ViewModel对象。
    /// </summary>
    [AutoMapFrom(typeof(GetOtherCheckForEditOutput))]
    public class CreateOrEditOtherCheckModalViewModel : GetOtherCheckForEditOutput
    {
        public bool IsEditMode
        {
            get { return OtherCheck.Id.HasValue; }
        }
        /// <summary>
        /// 辅助核算类型
        /// </summary>
        public string CheckType { get; set; }
        public List<ComboboxItemDto> GetCheckTypeList { get; set; }

        public CreateOrEditOtherCheckModalViewModel(GetOtherCheckForEditOutput output)
        {
            output.MapTo(this);
        }
    }
}